/**
 * 
 */
package nullby.omnia.model;

import java.util.Date;

import nullby.common.model.BaseModel;

import org.json.JSONObject;

import android.database.Cursor;
import android.os.Parcel;

/**
 * @author Sergey Bandysik
 * 
 */
public final class Theme extends BaseModel {
	private static final String TAG = Theme.class.getSimpleName();

	private String id;
	private String id_user;
	private String id_translation;
	private String name;
	private String description;
	private String path_icon_file;
	private Date last_date_open;
	private Integer count_view;
	private Date date_move_to_archive;
	private String archive;

	/**
	 * 
	 */
	public Theme() {
		// TODO Auto-generated constructor stub
	}

	/**
	 * @param json
	 */
	public Theme(String json) {
		super(json);
		// TODO Auto-generated constructor stub
	}

	/**
	 * @param json
	 */
	public Theme(JSONObject json) {
		super(json);
		// TODO Auto-generated constructor stub
	}

	/**
	 * @param in
	 */
	public Theme(Parcel in) {
		super(in);
		// TODO Auto-generated constructor stub
	}

	public Theme(Cursor rawQuery) {
		if (rawQuery.moveToFirst()) {
			do {
				id_user = rawQuery.getString(0);
				id_translation = rawQuery.getString(1);
				name = rawQuery.getString(2);
				description = rawQuery.getString(3);
				archive = rawQuery.getString(4);
			} while (rawQuery.moveToNext());
		}

	}

	@Override
	public String toString() {
		return name;
	}

	public String getName() {
		return name;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setId_translation(String id_translation) {
		this.id_translation = id_translation;
	}

	public void setName(String name) {
		this.name = name;
	}

}
